<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible"
        content="ie=edge">
  <title>ng-style</title>
  <script src="../lib/angular.1.7.8.js"></script>
  <style>
    .sky {
      color: white;
      background-color: lightblue;
      padding: 20px;
      font-family: "Courier New";
    }

    .tomato {
      background-color: coral;
      padding: 40px;
      font-family: Verdana;
    }

  </style>
</head>

<body ng-app="myApp" ng-controller="myCtrl">
 <div ng-style="{color:'white', backgroundColor:'coral'}">ng-style 绑定样式</div>
 <div ng-style="headStyle">ng-style 绑定样式</div>
 <script>
   angular.module('myApp', [])
     .controller('myCtrl', function($scope) {
       $scope.headStyle = {
         color: 'white',
         backgroundColor: 'coral',
         fontSize: '60px',
         padding: '40px'
       }
     })
 </script>
</body>

</html>
